package org.jeecg.modules.rental.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @Description: 代金券活动
 * @Author: sean
 * @Date:   2024-08-19
 * @Version: V1.0
 */
@Data
@TableName("rental_coupon_config")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="rental_coupon_activity对象", description="卡券配置")
public class RentalCouponConfig implements Serializable {
    private static final long serialVersionUID = 1L;

	/**代金券配置id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "代金券配置id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
	/**代金券名称*/
	@Excel(name = "代金券名称", width = 15)
    @ApiModelProperty(value = "代金券名称")
    private String name;
    /**代金券类别*/
    @Excel(name = "代金券类别", width = 15)
    @ApiModelProperty(value = "代金券类别")
    private String categoryCode;
    @TableField(exist = false)
    private String categoryName;
	/**优惠类型 价格*/
	@Excel(name = "价格", width = 15)
    @ApiModelProperty(value = "价格")
    private BigDecimal price;
	/**使用门槛金额 0-无门槛*/
	@Excel(name = "使用门槛金额", width = 15)
    @ApiModelProperty(value = "使用门槛金额")
    private BigDecimal minAmount;
	/**满减金额*/
	@Excel(name = "面值(抵扣券需要)", width = 15)
    @ApiModelProperty(value = "面值(抵扣券需要)")
    private BigDecimal faceValue;
	/**有效天数*/
	@Excel(name = "有效天数", width = 15)
    @ApiModelProperty(value = "有效天数")
    private Integer validDays;
	/**开始时间*/
	@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开始时间")
    private LocalDateTime startTime;
	/**结束时间*/
	@Excel(name = "结束时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "结束时间")
    private LocalDateTime endTime;
	/**0-待生效 1-进行中 3-已结束*/
	@Excel(name = "0-待生效 1-进行中 3-已结束", width = 15)
    @ApiModelProperty(value = "0-待生效 1-进行中 3-已结束")
    private String status;
    /**代金券配色*/
    @Excel(name = "代金券配色", width = 15)
    @ApiModelProperty(value = "代金券配色")
    private String color;
	/**总发放数量 0-无限量*/
	@Excel(name = "总发放数量 0-无限量", width = 15)
    @ApiModelProperty(value = "总发放数量 0-无限量")
    private Integer totalNum;
	/**已发放数量*/
	@Excel(name = "已发放数量", width = 15)
    @ApiModelProperty(value = "已发放数量")
    private Integer sendNum;
	/**支付订单id*/
	/*@Excel(name = "支付订单id", width = 15)
    @ApiModelProperty(value = "支付订单id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long payOrderId;*/
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建日期*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private LocalDateTime createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新日期*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private LocalDateTime updateTime;
	/**是否删除（0：否、1：是）*/
	@Excel(name = "是否删除（0：否、1：是）", width = 15)
    @ApiModelProperty(value = "是否删除（0：否、1：是）")
    @TableLogic(value="0", delval = "1")
    private String isDelete;
}
